<template>
    <div id="app">
        <router-view  v-if="isRouterAlive"/>
    </div>
</template>
<script>
import initMenu from "./common/initMenu"
export default {
    data () {
        return {
            isRouterAlive: true
        }
    },
    provide () {
        return {
            reload: this.reload
        }
    },
    methods:{
        reload () {
            this.isRouterAlive = false
            this.$nextTick(() => {
                this.isRouterAlive = true
            })
        }
    },
    created(){
        initMenu()
    }
}
</script>